import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: () => import('@/views/index.vue'),
    children:[
      {
        path: 'addRepices',
        component: () => import('@/views/Repice'),
        name: '添加食谱'
      },
      {
        path: 'addFood',
        component: () => import('@/views/Food'),
        name: '添加食材'
      },
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
